from fastapi import FastAPI
from application.http.controllers import api


__all__ = ['init_api_routers']


def init_api_routers(app: FastAPI):
    # ROOT 路由
    app.include_router(api.root.router, prefix='/api')
    # Profile 路由
    app.include_router(api.profile.router, prefix='/api')
    # 公共 路由
    app.include_router(api.common.router, prefix='/api')

    # 系统路由
    app.include_router(api.system.dashboard.router, prefix='/api')
    # 配置路由
    app.include_router(api.system.setting.router, prefix='/api')
    # 系统 下载单路由
    app.include_router(api.system.download.router, prefix='/api')
    # 系统 扩展路由
    app.include_router(api.system.extension.router, prefix='/api')

    # 品牌商路由
    # 品牌商用户路由
    app.include_router(api.brand.user.router, prefix='/api')
    # 品牌商 商户号账户路由
    app.include_router(api.brand.account.router, prefix='/api')
    # 品牌商 商品路由
    app.include_router(api.brand.good.router, prefix='/api')
    # 品牌商 商户号域名路由
    app.include_router(api.brand.tenant_domain.router, prefix='/api')
    # 品牌商 模板路由
    app.include_router(api.brand.tenant_template.router, prefix='/api')
    # V2 模板路由
    app.include_router(api.brand.v2.router, prefix='/api')
    # 品牌商 素材路由
    app.include_router(api.brand.asset.router, prefix='/api')
    # 品牌商 设备管理
    app.include_router(api.brand.device.router, prefix='/api')

    # 码管理
    # 码管理 扫码记录路由
    app.include_router(api.code.codelog.router, prefix='/api')
    # 码管理 生码单路由
    app.include_router(api.code.order.router, prefix='/api')
    # 码管理 作废码路由
    app.include_router(api.code.abolish.router, prefix='/api')
    # 码管理 批次关联路由
    app.include_router(api.code.relation.router, prefix='/api')
